home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Very Best of Atari Inside
/
The Very Best of Atari Inside 1.iso
/
mint
/
mntlib25
/
_cmpsf2.s
< prev
next >
Wrap
Text File
|
1992-12-12
|
854b
|
50 lines
| single floating point compare routine
|
| written by Kai-Uwe Bloem (I5110401@dbstu1.bitnet).
| Based on a 80x86 floating point packet from comp.os.minix, written by P.Housel
|
|
| Revision 1.1, kub 12-89 :
| Created single float version for 68000
|
| Revision 1.0:
| original 8088 code from P.S.Housel for double floats
.text
.even
.globl __cmpsf2, ___cmpsf2
| additional entry points for gcc2
.globl ___eqsf2, ___nesf2, ___gtsf2, ___gesf2, ___ltsf2, ___lesf2
__cmpsf2:
___cmpsf2:
___eqsf2:
___nesf2:
___gtsf2:
___gesf2:
___ltsf2:
___lesf2:
moveml sp@(4),d0-d1 | get u and v
tstl d1 | check sign bit
bpl 1f
negl d1 | negate
bchg #31,d1 | toggle sign bit
1:
tstl d0 | check sign bit
bpl 2f
negl d0 | negate
bchg #31,d0 | toggle sign bit
2:
cmpl d1,d0
blt lt
bgt gt
eq:
clrl d0
rts
lt:
moveq #-1,d0
rts
gt:
moveq #1,d0
rts